<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.UserModule.bean.*"%>
<%@page import="com.UserModule.dao.*"%>
<%@page import="security.AES"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>新增用户</title>
    <meta name="Robots" content="all" />
		<meta name="Author" content="Gushu">
		<meta name="Description" content="" />
		<meta name="Keywords" content="" />
		<link rel="shortcut icon" href="../favicon.ico" />
		<link rel="home" href="./" />
		<link rel="stylesheet" href="../styles/style.css" type="text/css" />
		<script src="../scripts/jquery.js" type="text/javascript"
			charset="utf-8"></script>
		<script src="../scripts/tabs.js" type="text/javascript"
			charset="utf-8"></script>
		<script src="../scripts/dragndrop.js" type="text/javascript"
			charset="utf-8"></script>
		<script src="../scripts/msgbox.js" type="text/javascript"
			charset="utf-8"></script>
		<script src="../scripts/mainAddress.js" type="text/javascript"
			charset="utf-8"></script>
		<script src="../scripts/sms_zhang.js" type="text/javascript"
			charset="utf-8"></script>
</head>
	<body>
	<%
	    int colSpanNum=2;
	    String trBgColor="";
	    if(request.getParameter("id")==null){
	    	
	%>
	    		<ul class="tabs-nav clearfix">
                    <li>新增用户</li>
                </ul>
                <div class="tabs-panel">
                 <form method="post" action="UserServlet" onSubmit="return userModule_checkForm(this);">
                	<table width="100%" class="datalist">
                     <tr>
                       <td class="tc">用&nbsp;户&nbsp;名:<input type="text" name="userName" id="userName" value="" reg="^.+$" tip="用户名不能为空" /></td>
                       </tr>
                       <tr>
                       <td class="tc">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:<input type="password" name="userPass" id="userPass" value="" reg="^.+$" tip="密码不能为空" /></td>
                      </tr>
                      　			　<tr>
                       <td class="tc">确认密码:<input type="password" name="reUserPass" id="reUserPass" value=""/></td>
                      </tr>
                      　			　<tr>
                       <td class="tc">&nbsp;标识码: 
                         <input type="text" name="biaoshi" id="biaoshi" value="" reg="^.+$" tip="标识码不能为空且为0到9的数字" /><font color="red">[0-9]</font></td>
                      </tr>
                      <tr>
                       <td><input type="submit" value="添 加"/>&nbsp;&nbsp;
                       <input type="button" name="clo" id="clo" onClick="$mb.close();" value="关 闭"/>
                       <input type="hidden" name="method" value="add"/>
                       </td>
                      </tr>
                    </table>
		 </form> 
		</div>
		<%
		}else{ 
		
		    TbUserBean tbUser=new TbUserDAO().getTbUsersByUserId(Integer.parseInt(request.getParameter("id")));
		    
		%>
		<ul class="tabs-nav clearfix">
                    <li>修改用户</li>
                </ul>
		<div class="tabs-panel">
                 <form method="post" action="UserServlet" onSubmit="return userModule_checkForm(this);">
                	<table width="100%" class="datalist">
                     <tr>
                       <td class="tc">用&nbsp;户&nbsp;名:<input type="text" name="userName" id="userName" value="<%=tbUser.getUserName() %>"/></td>
                       </tr>
                       <tr>
                       <td class="tc">密&nbsp;&nbsp;&nbsp;&nbsp;码:<input type="password" name="userPass" id="userPass" value="<%=tbUser.getUserPass() %>"/></td>
                      </tr>
                      　			　<tr>
                       <td class="tc">确认密码:<input type="password" name="reUserPass" id="reUserPass" value="<%=tbUser.getUserPass() %>"/></td>
                      </tr>
                      <tr>
                       <td><input type="submit" value="添 加"/>&nbsp;&nbsp;
                       <input type="button" name="clo" id="clo" onClick="$mb.close();" value="关 闭"/>
                       <input type="hidden" name="method" value="edit"/>
                       <input type="hidden" name="userId" value="<%=tbUser.getUserId() %>"/>
                       </td>
                      </tr>
                    </table>
		 </form> 
		</div>
		<%
		}
		 %>
		
</body>
</html>